﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using XbdSoft.Domain;

namespace XbdSoft.Domain
{
    public class XbdDbContext:DbContext
    {
        public XbdDbContext()
            : base()
        {
            base.Configuration.ProxyCreationEnabled = false;
            base.Configuration.LazyLoadingEnabled = false; 
        }

        public XbdDbContext(string nameorConnectionString)
            : base(nameorConnectionString)
        {
            base.Configuration.ProxyCreationEnabled = false;
            base.Configuration.LazyLoadingEnabled = false; 
        }

        /// <summary>
        /// 所有资源类表
        /// </summary>
        public DbSet<AudioResource> AudioResources { get { return base.Set<AudioResource>(); } }

        /// <summary>
        /// 推荐类别 列表
        /// </summary>
        public DbSet<AudioCategory> AudioCategories { get { return base.Set<AudioCategory>(); } }

        public DbSet<User> Users { get { return base.Set<User>(); } }

        public DbSet<AdvertisementMimi> AdvertisementMimis { get { return Set<AdvertisementMimi>(); } }

        public DbSet<AudioClass> AudioClasses { get { return Set<AudioClass>();} }
    }
}
